<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/font-awesome.min.css">

	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/doc.min.css">
	<style>
	.tree li{
        list-style-type: none;
		cursor:pointer;
	}
	</style>
</head>
<body>
<div class="col-sm-12 col-sm-offset-0 col-md-12 col-md-offset-0 main">
		<ol class="breadcrumb">
		  <li><a href="#">首页</a></li>
		  <li><a href="#">他权登记</a></li>
		</ol>
		<div class="panel panel-default">
	      <div class="panel-heading">表单数据<div style="float:right;cursor:pointer;" data-toggle="modal" data-target="#myModal"><i class="glyphicon glyphicon-question-sign"></i></div></div>
		  	<div class="panel-body">
			 	<div class="form-group" style="padding: 20px;">
			 		<form role="form" id="formHeright">
					<div class="form-group" style="padding: 20px;">
						<input type="hidden" value="${h_id}" name="h_id">
						<input type="hidden" value="${house_id}" name="house_id">
						<label for="exampleInputPassword1" class="col-sm-4 control-label" style="text-align: center;">抵押银行：</label>
						<div class="col-sm-8">
							<input type="text" class="form-control" name="heright_loansBank" placeholder="请输入抵押银行">
					  	</div>
					</div>
					 <div class="form-group" style="padding: 20px;">
						<label for="exampleInputPassword1" class="col-sm-4 control-label" style="text-align: center;">贷款金额：</label>
						<div class="col-sm-8">
							<input type="text" class="form-control" name="heright_residueMoney" placeholder="请输入贷款金额">
					  	</div>
					 </div>
					 <div class="form-group" style="padding: 20px;">
						<label for="exampleInputPassword1" class="col-sm-4 control-label" style="text-align: center;">抵押年限：</label>
						<div class="col-sm-8">
							<input type="text" class="form-control" name="heright_pledgeDuration" placeholder="请输入抵押年限">
					  	</div>
					 </div>
					 <div class="form-group" style="padding: 20px;">
					  	<label for="exampleInputPassword1" class="col-sm-4 control-label" style="text-align: center;">建立日期：</label>
						<div class="col-sm-8">
							<input type="date" class="form-control" name="heright_startDate" placeholder="请输入建立日期">
					  	</div>
					 </div>
					<div class="col-sm-3"  style="height:50px;width:300px;float:right; padding: 20px;">
				  		<button type="reset" class="btn btn-danger"><i class="glyphicon glyphicon-refresh"></i>重置</button>
				  		<button type="button" class="btn btn-danger" id="register"><i class="glyphicon glyphicon-refresh"></i>登记</button>
				  		<a href='${pageContext.request.contextPath}/houseRegister/ROO.jsp'><button type="button" class="btn btn-danger"><i class="glyphicon glyphicon-refresh"></i>返回</button></a>
					</div>
					</form>
				</div>
		 	</div>
		</div>
      </div>
    <script src="${pageContext.request.contextPath}/jquery/jquery-2.1.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/bootstrap/js/bootstrap.min.js"></script>
	<script src="${pageContext.request.contextPath}/script/docs.min.js"></script>
	<script type="text/javascript"  src="${pageContext.request.contextPath}/js/jquery-1.12.3.min.js"></script>
	<script type="text/javascript">
		$(function(){
			addHeright();
		});
		function addHeright(){
			$("#register").click(function(){
				$.ajax({
					url:"${pageContext.request.contextPath}/heright/addHeight",
					type:"post",
					async:true,
					data:$("#formHeright").serialize(),
	       			error:function(){
	       				
	       			},
	       			success:function(data){
	       				alert(data);
	       				location.href='${pageContext.request.contextPath}/houseRegister/ROO.jsp';
	       			}
				});
			});
		};
	</script>
</body>
</html>